using FytSoa.Domain.Core.Result;
using System.Threading.Tasks;
using FytSoa.Domain.Core.Param;

namespace FytSoa.Application.Cms
{
    /// <summary>
    /// 文章表 服务接口
    /// </summary>
    public interface ICmsArticleService:IApplicationService
    {
        /// <summary>
        /// 查询所有——分页
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<PageResult<CmsArticleDto>>> GetPagesAsync (PageParam<ArticleParam> param);
        
        /// <summary>
        /// 根据主键查询
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<CmsArticleDto>> GetAsync (long id);

        /// <summary>
        /// 添加
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<bool>> AddAsync (CmsArticleDto model);

        /// <summary>
        /// 修改
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<bool>> ModifyAsync (CmsArticleDto model);
        
        /// <summary>
        /// 添加到回收站
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<bool>> Recycle (string ids);

        /// <summary>
        /// 删除-支持多个删除，逗号分隔
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<bool>> DeleteAsync (string ids);
        
        /// <summary>
        /// 复制或转移操作
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<bool>> CopyTransfer (ArticleCopyParam param);
    }
}
